bitkeeper revision 1.1159.1.157 (41498180eHcx-bWB5PNWSkz9fUhPzA)
authorkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>
Thu, 16 Sep 2004 12:05:20 +0000 (12:05 +0000)
committerkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>
Thu, 16 Sep 2004 12:05:20 +0000 (12:05 +0000)
Put the scheduling check back into the network backend as it may
be useful to frontend drivers in some circumstances.

linux-2.6.8.1-xen-sparse/drivers/xen/netback/netback.c

index 77b715ece8292f2485e646a9d85f9f4476ea6df0..296771b83774252474a0dca216bbc22d2d43e3d1 100644 (file)
@@ -411,16 +411,16 @@ static void net_tx_action(unsigned long unused)
         
         pending_ring[MASK_PEND_IDX(pending_prod++)] = pending_idx;
 
-#if 0        
         /*
          * Scheduling checks must happen after the above response is posted.
-         * This avoids a possible race with a guest OS on another CPU.
+         * This avoids a possible race with a guest OS on another CPU if that
+         * guest is testing against 'resp_prod' when deciding whether to notify
+         * us when it queues additional packets.
          */
         mb();
         if ( (netif->tx_req_cons != netif->tx->req_prod) &&
              ((netif->tx_req_cons-netif->tx_resp_prod) != NETIF_TX_RING_SIZE) )
             add_to_net_schedule_list_tail(netif);
-#endif
         
         netif_put(netif);